package cn.tanghom.framework.system.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import cn.tanghom.framework.system.dao.UserDao;
import cn.tanghom.framework.system.entity.User;

@Repository
public class UserDaoImpl extends BaseDaoImpl<User> implements UserDao  {
	@Override
	public User getUserByloginName(String loginName) {
		StringBuffer hql = new StringBuffer("from User u where u.loginName = ?");
		User user = super.get(hql.toString(), loginName);
		return user;
	}

	@Override
	public List<User> findList() {
		String hql = "from User u where u.locked = "+User.NORMAL;
		return super.findList(hql);
	}

}
